package com.cdtye.itps.cms.dao.detect;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.cdtye.common.webcore.util.DateUtil;
import com.cdtye.itps.cms.dao.enums.DefectInfoStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 *
 * @author ty
 * @date 2021-04-16
 */
@ApiModel("接触网缺陷信息表")
@Data
@Accessors(chain = true)
@TableName("JCW_DEFECT_INFO")
public class JcjcDefectInfoSection {
    @ApiModelProperty("DEFECT_INFO_ID")
    @TableId(
            type = IdType.UUID
    )
    @TableField(
            value = "DEFECT_INFO_ID",
            jdbcType = JdbcType.VARCHAR
    )
    private String defectInfoId;


    //1.上面这一块是基本信息
    @ApiModelProperty(value = "线路Id")
    private String seclineId;

    @ApiModelProperty(value = "区站Id")
    private String siteId;

    @ApiModelProperty(value = "行别表ID")
    private String directionId;

    @ApiModelProperty(value = "股道ID")//暂时缺失
    private String trackId;

    @ApiModelProperty(value = "隧道ID")
    private String tunnelId;

    @ApiModelProperty(value = "支柱号Id")
    private String pillarId;

    @ApiModelProperty(value = "支柱号")
    private String pillarNum;

    @ApiModelProperty(value = "公里标")
    @TableField(
            value = "ROAD_MARK",
            jdbcType = JdbcType.NUMERIC
    )
    private Double roadMark;

    @ApiModelProperty(value = "工区id")
    private String deptId;

    @ApiModelProperty(value = "支柱号所属工区(这里记录)")
    private String pillarDeptId;

    @ApiModelProperty(value = "发现人，存人名")
    private String discoverPerson;

    @ApiModelProperty(value = "发现人ID，多个使用逗号分隔")//暂时缺失
    private String discoverPersonId;

    @ApiModelProperty(value = "发现部门Id")//暂时缺失
    private String findDeptId;

    @ApiModelProperty(value = "缺陷来源ID")//暂时缺失
    private String discoverSourceTypeId;

    @ApiModelProperty(value = "数据发现来源ID")//暂时缺失
    private String discoverSourceId;

    @ApiModelProperty(value = "缺陷等级ID")
    private String defectGradeId;

    @ApiModelProperty(value = "缺陷分类ID")
    private String defectTypeId;

    @ApiModelProperty(value = "发现日期")
    @DateTimeFormat(pattern = DateUtil.DATETIME_FORMAT)
    @JSONField(format = DateUtil.DATETIME_FORMAT)
    @TableField(
            value = "DISCOVER_DATE",
            jdbcType = JdbcType.DATE
    )
    private Date discoverDate;

    @ApiModelProperty(value = "缺陷描述")
    private String defectDescription;

    //2.这一块整改信息

    @ApiModelProperty(value = "处理人")
    private String solvePersonal;

    @ApiModelProperty(value = "缺陷处理状态 0：未处理 1：已处理")
    private String status;

    @ApiModelProperty(value = "数据来自哪个系统")
    private String systemSource;

    @ApiModelProperty(value = "C类型")
    private String cType;

    @ApiModelProperty("创建时间")
    @TableField(value ="CREATE_DATETIME", fill = FieldFill.INSERT, jdbcType = JdbcType.DATE)
    private Date createDatetime;

    @ApiModelProperty("更新时间")
    @TableField(value ="UPDATE_DATETIME",fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.DATE)
    private Date updateDatetime;

    @ApiModelProperty(value = "缺陷状态 0：未处理 1：已销号")
    private String defectStatus;

    @ApiModelProperty(value = "文件包Id")
    private String packageId;

    @ApiModelProperty(value = "缺陷地点")
    private String defectLoc;

    //填写时间 日期格式：yyyy-MM-dd HH:mm:ss
    @ApiModelProperty(value = "填写时间")
    @TableField(
            value = "REGISTER_DATE",
            jdbcType = JdbcType.DATE
    )
    private Date registerDate;

    //下发日期 日期格式：yyyy-MM-dd HH:mm:ss
    @ApiModelProperty(value = "下发日期")
    @TableField(
            value = "PUBLISH_DATE",
            jdbcType = JdbcType.DATE
    )
    private Date publishDate;

    //销号日期 日期格式：yyyy-MM-dd HH:mm:ss
    @ApiModelProperty(value = "销号日期")
    @TableField(
            value = "END_DATE",
            jdbcType = JdbcType.DATE
    )
    private Date endDate;

    @ApiModelProperty(value = "缺陷值")
    private String defectValue;

    //"是否典型缺陷， 0：否、1：是
    @ApiModelProperty(value = "是否典型缺陷")
    private String isFavorite;

    //下发人名称
    @ApiModelProperty(value = "下发人名称")
    private String publishUserName;

    //销号人名称
    @ApiModelProperty(value = "销号人名称")
    private String endName;

    //零部件编码
    @ApiModelProperty(value = "零部件编码")
    private String partCode;

    //零部件名称
    @ApiModelProperty(value = "零部件名称")
    private String partName;

    //"审批信息， 样例：[ {""name"": ""姓名"",""auditDate"": ""审批时间，yyyy-MM-dd HH:mm:ss"",auditDesc"": ""审批意见"",""auditResult"": ""审批结论,0：不通过，1：通过"",}]"
    @ApiModelProperty(value = "审批信息")
    private String auditInfo;

    //整改期限,样例：”2019-06-15”
    @ApiModelProperty(value = "整改期限")
    @TableField(
            value = "RECTIF_DATETIME",
            jdbcType = JdbcType.DATE
    )
    private Date rectifDatetime;

    //"复测图片， name 文件名 String xx.jpg;photoUrl 照片地址 String HTTPS://xx/xx.jpg; photoType 照片类型 String 1：杆号照片 2：复测照片"
    @ApiModelProperty(value = "复测图片")
    private String retestPhoto;

    //"整改图片，name 文件名 String xx.jpgphotoUrl 照片地址 String HTTPS://xx/xx.jpgphotoType 照片类型 String 1：杆号照片 2：整改前照片 3：整改后照片"
    @ApiModelProperty(value = "整改图片")
    private String dealPhoto;

    //"复核值，样例： [{""setloc"": ""支柱号"",""km"": ""公里标，k100+100"",""LCZ"": 10,""WD"": 12}]"
    @ApiModelProperty(value = "复核值")
    private String measureValue;

    //"整改值，样例：  [{""setloc"": ""支柱号"",""km"": ""公里标，k100+100"", ""LCZ"": 10,""WD"": 12}]"
    @ApiModelProperty(value = "整改值")
    private String dealValue;

    //删除状态  Y 删除  N 否
    @ApiModelProperty("删除标志，Y=是，N=否")
    @TableField(value ="DEL_FLAG", fill = FieldFill.INSERT ,jdbcType = JdbcType.CHAR)
    private String delFlag;

    //"审核，样例： 录入审核0：未审核 1：审核中 2：已审核通过 3：审核不通过
    @ApiModelProperty(value = "录入审核")
    @TableField(
            value = "INPUT_AUDIT_STATUS",
            jdbcType = JdbcType.NUMERIC
    )
    private int inputAuditStatus;

    //"销号审核，样例： '销号审核0：未审核 1：审核中 2：已审核通过 3：审核不通过'
    @ApiModelProperty(value = "销号审核")
    private int rectifAuditStatus;

    //"校核，样例： '校核0：未校核 1：校核通过 2：校核不通过'
    @ApiModelProperty(value = "校核")
    private int checkAuditStatus;

    @ApiModelProperty(value = "延期状态")
    private int deferredStatus;

    @ApiModelProperty(value = "缺陷描述")
    private String defectInfoDesc;

    @ApiModelProperty(value = "处理日期")
    @DateTimeFormat(pattern = DateUtil.DATE_FORMAT)
    @JSONField(format = DateUtil.DATE_FORMAT)
    private Date solveDatetime;

    @ApiModelProperty(value = "处理描述")
    private String solveMethod;

    @ApiModelProperty(value = "处理工区")//暂时缺失
    private String handleWorkareaId;

    @ApiModelProperty(value = "来源实体(检测一体化新增)")//暂时缺失
    private String sourceModel;

    @ApiModelProperty(value = "来源系统创建日期")
    @DateTimeFormat(pattern = DateUtil.DATE_FORMAT)
    @JSONField(format = DateUtil.DATE_FORMAT)
    private Date createDatetimeSource;

    @ApiModelProperty(value = "整改责任工区")//暂时缺失
    private String solveWorkareaId;

}
